package com.ruoyi.workflow.controller;

import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.mapper.SysDeptMapper;
import com.ruoyi.system.mapper.SysUserMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RestController;
import vip.lsjscl.flowboot.common.ResponseData;
import vip.lsjscl.flowboot.workflow.controller.DKWorkflowSystemController;

/**
 * 系统数据接口实现
 *
 * @author zhangxingju
 * @date 2025/02/13
 */
@RestController
@RequiredArgsConstructor
public class SystemControllerImpl implements DKWorkflowSystemController {

    private final  SysUserMapper userMapper;
    private final SysDeptMapper deptMapper;
    @Override
    public ResponseData getUsers(String name) {
        SysUser user=new SysUser();
        user.setUserName(name);
        return ResponseData.ok(userMapper.selectUserList(user));
    }

    @Override
    public ResponseData getDepartments() {
        return ResponseData.ok(deptMapper.selectDeptList(new SysDept()));
    }
} 